﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yinyue
{
    class TuPian
    {
        private static TuPian tuPian = null;
        private TuPian() { }
        public static TuPian getAddTuPian()
        {
            if (tuPian == null)
            {
                tuPian = new TuPian();
            }
            return tuPian;
        }
        public  string getAlbumpic_small(string id) {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".jpg";
            if (File.Exists(Path))
            {
                return Path;
            }
            else
            {
                return null;
            } 
        }
        public string getSongNameg( string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string songName=line[0];
            return songName;
        }
        public string getSingerName( string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string SingerName = line[9];
            return SingerName;
        }
        public string getSongid(string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string SingerName = line[3];
            return SingerName;
        }
        public string getUrl(string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string SingerName = line[8];
            return SingerName;
        }
        public string getSeconds(string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string SingerName = line[1];
            return SingerName;
        }
        public string getAlbummid(string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string SingerName = line[2];
            return SingerName;
        }
        public string getSingerid(string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string SingerName = line[4];
            return SingerName;
        }
        public string getAlbumpic_big(string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string SingerName = line[5];
            return SingerName;
        }
        public string getDownUrl(string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string SingerName = line[7];
            return SingerName;
        }

        public string getAlbumid(string id)
        {
            string Path = "D:\\音乐\\" + id + "\\" + id + ".txt";
            string[] line = File.ReadAllLines(Path);
            string SingerName = line[10];
            return SingerName;
        }
    }
}
